dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
36c18cf
)
Test to make sure numRows() calls don't show unrelated errors
author
Chad Horohoe
<chadh@wikimedia.org>
Mon, 26 Nov 2012 13:34:20 +0000
(08:34 -0500)
committer
Demon
<chadh@wikimedia.org>
Fri, 22 Mar 2013 13:51:07 +0000
(13:51 +0000)
Bug: 42430
Change-Id: Ie939785c1f75aa99bdf59e013d5ebf65e866289c
tests/phpunit/includes/db/DatabaseTest.php
patch
|
blob
|
history
diff --git
a/tests/phpunit/includes/db/DatabaseTest.php
b/tests/phpunit/includes/db/DatabaseTest.php
index
65c80d1
..
c9f5f5c
100644
(file)
--- a/
tests/phpunit/includes/db/DatabaseTest.php
+++ b/
tests/phpunit/includes/db/DatabaseTest.php
@@
-209,4
+209,10
@@
class DatabaseTest extends MediaWikiTestCase {
. ( $this->db->getType() == 'postgres' ? '()' : '' )
);
}
+
+ function testUnknownTableCorruptsResults() {
+ $res = $this->db->select( 'page', '*', array( 'page_id' => 1 ) );
+ $this->assertFalse( $this->db->tableExists( 'foobarbaz' ) );
+ $this->assertInternalType( 'int', $res->numRows() );
+ }
}